package tp2lab;

import static org.junit.Assert.*;

import org.junit.*;

public class CardTest {
    Card card;
    @Before
    public void setUp(){
        card = new Card("10", "karo", 10);
    }
    
    @Test
    public void getFiguraTest(){
        assertEquals("Nie dziala metoda getFigura() klasy Card", "10", card.getFigura());
    }
    
    @Test
    public void getKolorTest(){
        assertEquals("Nie dziala metoda getKolor() klasy Card", "karo", card.getKolor());
    }
    
    @Test
    public void getWartoscTest(){
        assertEquals("Nie dziala metoda getWartosc() klasy Card", 10, card.getWartosc());
    }
    
    @Test
    public void toStringTest(){
        assertEquals("Nie dziala metoda toString() klasy Card", card.getFigura() + " " + card.getKolor(), card.toString());
    }
    
    @Test
    public void cardTest(){
        Card card = new Card("8", "kier", 8);
        assertEquals("Nie dziala konstruktor Card", "8", card.getFigura());
        assertEquals("Nie dziala konstruktor Card", "kier",  card.getKolor());
        assertEquals("Nie dziala konstruktor Card", 8, card.getWartosc());
    }
    
    @After
    public void tearDown(){
        card = null;
    }
}